<?php

$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
     'id'=>'stockadjustmentwidget',
     'options'=>array(
         'title'=>'Stock Adjustment',
         'autoOpen'=>false,
         'modal'=>true,
         'width'=>400,
		 'height'=>200,
		 'resizable'=>false
     ),
   ));

?>

<?php echo CHtml::beginForm(array('item/form')); ?>

	<input type="hidden" name="form_action" value="stockadjustment" />
	<input type="hidden" name="item" value="<?php echo $model->item_id; ?>" />
 
 	<table>
 		<tr>
 			<td height="45" width="150"><b>Current Quantity</b></td>
 			<td><?php echo $model->quantity; ?></td>
 		</tr>
 		<tr>
 			<td colspan="2" height="45">
 			<select name="direction">
				<option value=""></option>
				<option value="increase">Increase</option>
				<option value="decrease">Decrease</option>
			</select> 
		    current item level by <input type="text" name="change_amount" size="4" /> <br/>
 			</td>
 		</tr>
 		<tr>
 			<td colspan="2" align="right"><a href="#">Cancel</a> or <input type="submit" value="update" /></td>
 		</tr>
 	</table>
 
<?php echo CHtml::endForm(); ?>
 
<?php $this->endWidget('zii.widgets.jui.CJuiDialog'); ?>
